package com.sunda.spmswms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sunda.spmswms.entity.SapDeliveryNoteDtl;
import com.sunda.spmswms.mapper.SapDeliveryNoteDtlMapper;
import com.sunda.spmswms.service.ISapDeliveryNoteDtlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * SAP交货单表明细 服务实现类
 * </p>
 *
 * @author Wayne
 * @since 2021-03-22
 */
@Service
public class SapDeliveryNoteDtlServiceImpl extends ServiceImpl<SapDeliveryNoteDtlMapper, SapDeliveryNoteDtl> implements ISapDeliveryNoteDtlService {

    @Autowired
    SapDeliveryNoteDtlMapper sapDeliveryNoteDtlMapper;

    @Override
    public List<Map<String, Object>> getDeliveryNoteDtlBySapDN(String deliveryNoteSap) {

        if(null==deliveryNoteSap || "".equals(deliveryNoteSap)) return new ArrayList<>();

        return sapDeliveryNoteDtlMapper.sapDeliveryNoteDtls(deliveryNoteSap);

    }
}
